package del3;

public class SumCell extends Cell {
	private Cell cell1;
	private Cell cell2;
	private double value;
	
	public SumCell(Cell cell1, Cell cell2) {
		this.cell1 = cell1;
		this.cell2 = cell2;
		value = 0.0;
	}
	
	public double getNumberValue() {
		value = cell1.getNumberValue() + cell2.getNumberValue();
		return value;
	}
	
	public String toString() {
		return "" + getNumberValue();
	}
}
